package site.mingdao.boot.web.plugin.log.config;

import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import site.mingdao.boot.web.plugin.log.core.aop.OperateLogAspect;

@EnableConfigurationProperties(LogProperties.class)
@AutoConfiguration
public class OperateLogAutoConfiguration {

    @Bean
    @ConditionalOnProperty(value = "mingdao.framework.operate-log-enable")
    public OperateLogAspect operateLogAspect() {
        return new OperateLogAspect();
    }

}
